<%@ Page Language="C#" MasterPageFile="~/Demo.master" AutoEventWireup="true" 
    Inherits="SharpPieces.DemoApp.ExtendedListBoxFunctionality" 
    CodeBehind="extendedlistboxfunctionality.aspx.cs" %>

<asp:Content ID="Content2" ContentPlaceHolderID="headPlaceHolder" Runat="Server">
    <title>SharpPieces - ExtendenListBox Functionality - Live Demo</title>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="descriptionPlaceholder" Runat="Server">
    <h1>ExtendenListBox Functionality</h1>

    <p>ExtendedListBox control extends the functionality of the standard ASP NET ListBox control, providing support 
    for the select's OPTGROUP tag, which the ListBox control doesn't know about. It also keeps the 
    attributes of the ListItem class in the viewstate, a functionality that lacks in the ListBox 
    control. ExtendedListBox control has also strong-type properties for the class name of the 
    ListItem(CssClass and GroupCssClass properties).</p>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="demoPlaceholder" Runat="Server">
    <asp:Button ID="btnPostback" Text="Do postback!" runat="server"  /><br /><hr />
    ExtendedListBox from code:<br />
    <piece:ExtendedListBox ID="listBox" SelectionMode="Multiple" runat="server">
    </piece:ExtendedListBox>
    <hr />
    ExtendedListBox from markup:<br />
        <piece:ExtendedListBox ID="listBoxFromMarkup" SelectionMode="Multiple" runat="server">
            <ExtendedItems>
                <piece:ExtendedListItem GroupingText="Group 1" Text="My item" Value="1" GroupingType="New">
                </piece:ExtendedListItem>
                <piece:ExtendedListItem Text="My item 1.1" Value="1.1" GroupingType="inherit">
                </piece:ExtendedListItem>
                <piece:ExtendedListItem Text="My item 1.2" Value="1.2" GroupingType="inherit">
                </piece:ExtendedListItem>
                
                <piece:ExtendedListItem Text="Item without group" Value="0.1" GroupingType="none">
                </piece:ExtendedListItem>
                
                <piece:ExtendedListItem GroupingText="Group 2" Text="My item" Value="2" GroupingType="New">
                </piece:ExtendedListItem>
                <piece:ExtendedListItem Text="My item 2.1" Value="2.1" GroupingType="inherit">
                </piece:ExtendedListItem>
                <piece:ExtendedListItem Text="My item 2.2" Value="2.2" GroupingType="inherit">
                </piece:ExtendedListItem>
            </ExtendedItems>
        </piece:ExtendedListBox>
</asp:Content>

